import $http from './request.js'

// 查询司机列表
export function getDriverList(data) {
  return $http.get('/vehicle/drivers', data)
}

// 车企搜索审核通的司机
export function getPublishDriverList(data) {
  return $http.get('/vehicle/company/search/publish/driver', data)
}

// 下单查询司机列表
export function orderGetDriver(query) {
  return $http.get('/vehicle/driver/orderGetDriver', query)
}

// 选择司机判断逻辑
export function bindJudgment(query) {
  return $http.get('/vehicle/driver/bindJudgment', query)
}

// 获取司机数据统计
export function companyDriverCountStatistics(data) {
  return $http.get('/vehicle/company/driver/statistics', data)
}

// 删除司机信息
export function deleteDriverInfo(userId, data) {
  return $http.post('/vehicle/driver/delete/' + userId, data)
}

// 添加司机邀请
export function inviteDriver(data) {
  return $http.post('/vehicle/driverInviteRecord/add', data)
}

// 设置司机状态
export function setDriverStatus(data) {
  return $http.post('/vehicle/driver/updateStatus', data,
    { header: { 'Content-Type': 'application/json;charset=UTF-8' }}
  )
}

// 查看司机所设置状态
export function driverLastStatus(data) {
  return $http.get('/vehicle/driver/lastModification', data)
}

// 
// 顺风车订单详情
export function grabOrderDetail(orderId, params) {
	return $http.get('/driverSubsidyProportion/page/' + orderId,params)
}

// 顺风车司机接单设置的列表数据
export function driverSubsidyProportionPage(data){
	return $http.get('/vehicle/driverSubsidyProportion/page', data)
}
//提交证件审核
export function submitCertificatesStatus(data) {
	return $http.post('/vehicle/certificationInfo/review/submit', data,{
		header: {
			'Content-Type': 'application/json;charset=UTF-8'
		}
	})
}
// 顺风车司机接单设置
export function setDriverSubsidyProportion(data) {
  return $http.post('/vehicle/driverSubsidyProportion/setDriverSubsidyProportion', data, {
    header: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
// 获取车企抢单开关状态
export function getCarpoolTakeOrderStatus(){
	return $http.get('/user/autoCompany/carpoolTakeOrderStatus')
}

// 设置车企抢单开关状态
export function setCarpoolTakeOrderStatus(status){
	return $http.post('/user/autoCompany/carpoolTakeOrderStatus/' + status)
}

// 顺风车订单查询
export function grabOrderPage(params){
	return $http.get('/order/carpoolOrder/grabOrderPage/' , params)
}

// 顺风车订单多种类型列表请求
export function pageOrderRecord(params){
	return $http.get('/order/carpoolOrder/pageOrderRecord/' , params)
}
// 顺风车抢单
export function companyGrabOrders(params){
	console.log(params)
	// return $http.get('/order/carpoolOrder/companyGrabOrders/')
	return $http.post(`/order/carpoolOrder/companyGrabOrders/${params}`)
}


